package com.example.banksys;


import javafx.beans.property.*;
import java.sql.Timestamp;

public class Account {
    private SimpleStringProperty type;
    private SimpleLongProperty customer_ID;
    private SimpleDoubleProperty balance;
    private Timestamp open_time;
    private SimpleLongProperty account_ID;
    private SimpleStringProperty password;

    /*************************************************
     * 这类包含复杂类型的，初始化要将里面的复杂类型全部初始化
     * 需要重新编写一个构造方法！
     *************************************************/

    public Account(){
        this.type=new SimpleStringProperty();
        this.account_ID=new SimpleLongProperty();
        this.customer_ID=new SimpleLongProperty();
        this.password=new SimpleStringProperty();
        this.balance=new SimpleDoubleProperty();
        //这里timeStamp似乎比较特殊，不能先进行实例化，必须传入参数
    }
    public Timestamp getOpen_time() {
        return open_time;
    }

    public double getBalance() {
        return balance.get();
    }

    public long getAccount_ID() {
        return account_ID.get();
    }

    public long getCustomer_ID() {
        return customer_ID.get();
    }

    public String getPassword() {
        return password.get();
    }

    public String getType() {
        return type.get();
    }

    public void setAccount_ID(long account_ID) {
        this.account_ID.set(account_ID);
    }

    public void setBalance(double balance) {
        this.balance.set(balance);
    }

    public void setCustomer_ID(long customer_ID) {
        this.customer_ID.set(customer_ID);
    }

    public void setOpen_time(Timestamp open_time) {
        this.open_time = open_time;
    }

    public void setPassword(String password) {
        this.password.set(password);
    }

    public void setType(String type) {
        this.type.set(type);
    }

}
